Fix mem corruption when using get_posn.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 6 May 2004 13:26:45 +0000 (13:26 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 6 May 2004 13:26:45 +0000 (13:26 +0000)
gpsbabel/garmin.c

index 802e96338228f5f7e779c82da6e6419b4e7d44f7..43d536ebdd1228dde26323a49d2d23ce4f74c330 100644 (file)
@@ -155,7 +155,7 @@ waypt_read(void)
                waypoint *wpt = waypt_new();
                wpt->latitude = gps_save_lat;
                wpt->longitude = gps_save_lon;
-               wpt->shortname = "Position";
+               wpt->shortname = xstrdup("Position");
                waypt_add(wpt);
                return;
        }